<?php
/* @var $this PercepcionController */
/* @var $model Percepcion */

$this->breadcrumbs=array(
	'Percepcions'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'Administrar Cliente', 'url'=>array('cliente/index'))
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#percepcion-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<?php echo CHtml::link('Busqueda Avanzada','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php  $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'percepcion-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		array( 'name'=>'cliente', 'value'=>'isset($data->cliente0->nombre) ? $data->cliente0->nombre: "-"' ),
		'contribuyenteRN:boolean',
		'convenio_multilateral:boolean',
		'jusrisdiccionRN:boolean',
		'coeficiente',
		'nro_iibb',
		/*
		'situacion',
		*/
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
